﻿using System;

namespace Array
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] Array = new int[] { 1, 3, 5, 7, 9 };   //定义数组
            Console.WriteLine("原数组数值为：");
            for (int i = 0; i < 5; i++)
            {
                Console.Write(Array[i]);                 //输出改变前数组
            }
            Console.WriteLine();
            change(Array);                               //调用函数改变数组数值
            Console.WriteLine("改变后数组数值为：");
            for (int i = 0; i < 5; i++)
            {
                Console.Write(Array[i]);                 //输出改变后数组
            }
            
        }
        /// <summary>
        /// 数值更改函数
        /// </summary>
        /// <param name="Array"></param>
        static void change(int[] Array)
        {
            for (int i = 0; i < Array.Length; i++)
            {
                Array[i]++;
            }
        }
    }
}
